package com.ys.erp.entity.data.bean;

import com.baomidou.mybatisplus.annotation.*;

import java.time.LocalDateTime;
import lombok.Data;

/**
 * @author lwj
 * @date 2025/5/19
 */
    
@Data
@TableName(value = "t_shop")
public class Shop {
    /**
     * 主键
     */
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    /**
     * 店铺编码
     */
    @TableField(value = "code")
    private String code;

    /**
     * 店铺编码，适应多租户，后添加字段
     */
    @TableField(value = "shop_code")
    private String shopCode;

    /**
     * 对应微分呗id
     */
    @TableField(value = "wfb_shop_id")
    private String wfbShopId;

    /**
     * 微分呗对应密钥
     */
    @TableField(value = "wfb_secret")
    private String wfbSecret;

    /**
     * 微分呗区块链密钥
     */
    @TableField(value = "wfb_qkl_secret")
    private String wfbQklSecret;

    /**
     * 店铺名字
     */
    @TableField(value = "`name`")
    private String name;

    /**
     * 联系人二维码
     */
    @TableField(value = "shop_qr_code")
    private String shopQrCode;

    /**
     * 门店图
     */
    @TableField(value = "shop_photo")
    private String shopPhoto;

    /**
     * 店铺地址
     */
    @TableField(value = "address")
    private String address;

    /**
     * 门店联系手机号
     */
    @TableField(value = "shop_phone")
    private String shopPhone;

    /**
     * 经度
     */
    @TableField(value = "lon")
    private String lon;

    /**
     * 纬度
     */
    @TableField(value = "lat")
    private String lat;

    /**
     * 首页轮播图，json格式
     */
    @TableField(value = "banner")
    private String banner;

    /**
     * 门店介绍轮播图
     */
    @TableField(value = "intro_banner")
    private String introBanner;

    /**
     * 状态，0正常，1禁用
     */
    @TableField(value = "shop_status")
    private Integer shopStatus;

    /**
     * 门店营业时间
     */
    @TableField(value = "shop_ok_time")
    private String shopOkTime;

    /**
     * 乐观锁版本号
     */
    @TableField(value = "version")
    @Version
    private Integer version;

    @TableField(value = "create_time")
    private LocalDateTime createTime;

    @TableField(value = "update_time", update = "now()")
    private LocalDateTime updateTime;

    /**
     * 租户id
     */
    @TableField(value = "tenant_id")
    private Integer tenantId;

    /**
     * 二级租户id
     */
    @TableField(value = "tenant_two_id")
    private Integer tenantTwoId;

    /**
     * 店铺等级，1总店，2二级店，3：三级店
     */
    @TableField(value = "shop_grade")
    private Integer shopGrade;

    /**
     * 子店
     */
    @TableField(value = "child_shop")
    private String childShop;

    /**
     * 总店id
     */
    @TableField(value = "parent_id")
    private Long parentId;

    /**
     * 是否是加盟商 0直营 1加盟 2联营 3外采
     */
    @TableField(value = "is_join_bus")
    private Integer isJoinBus;

    /**
     * 管理人员id
     */
    @TableField(value = "manage_emp_id")
    private Long manageEmpId;

    /**
     * 开业时间
     */
    @TableField(value = "open_time")
    private LocalDateTime openTime;

    /**
     * 销售佣金比例
     */
    @TableField(value = "sale_cat_commission")
    private Integer saleCatCommission = 0;

    /**
     * 猫咪采购费用比例
     */
    @TableField(value = "cat_procure_proportion")
    private Integer catProcureProportion = 0;

    /**
     * 物品采购费用比例
     */
    @TableField(value = "goods_procure_proportion")
    private Integer goodsProcureProportion = 0;
}